package com.nuoniu.sibanyun.entity.production;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * bom明细表
 * </p>
 *
 * @author 小啊刚
 * @since 2021-01-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mab_bom_detail")
@ApiModel(value="VBomDetail对象", description="bom明细表")
public class ErpBomDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主bom id")
    @TableField("order_id")
    private Integer orderId;

    @ApiModelProperty(value = "物料id")
    @TableField("inventory_id")
    private Integer inventoryId;

    @ApiModelProperty(value = "子件编码")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "子件名称")
    @TableField("inventory_name")
    private String inventoryName;

    @ApiModelProperty(value = "子件bom id")
    @TableField("bom_id")
    private Integer bomId;

    @ApiModelProperty(value = "子件bom版本号")
    @TableField("bom_version")
    private String bomVersion;

    @ApiModelProperty(value = "主计量ID")
    @TableField("base_unit")
    private Integer baseUnit;

    @ApiModelProperty(value = "主计量名称")
    @TableField("base_unit_name")
    private String baseUnitName;

    @ApiModelProperty(value = "数量")
    @TableField("base_quantity")
    private BigDecimal baseQuantity;

    @ApiModelProperty(value = "换算率")
    @TableField("unit_exchange_rate")
    private BigDecimal unitExchangeRate;

    @ApiModelProperty(value = "辅计量")
    @TableField("sub_unit")
    private Integer subUnit;

    @ApiModelProperty(value = "辅计量名称")
    @TableField("sub_unit_name")
    private String subUnitName;

    @ApiModelProperty(value = "辅计量数量")
    @TableField("sub_quantity")
    private BigDecimal subQuantity;

    @ApiModelProperty(value = "需要数量(主)")
    @TableField("require_quantity")
    private BigDecimal requireQuantity;

    @ApiModelProperty(value = "计量单位组ID")
    @TableField("unit_group_id")
    private Integer unitGroupId;


    @ApiModelProperty(value = "计量单位id")
    @TableField("unit_id")
    private Integer unitId;

    @ApiModelProperty(value = "计量单位名称")
    @TableField("unit_name")
    private String unitName;

    @ApiModelProperty(value = "生产数量")
    @TableField("production_quantity")
    private BigDecimal productionQuantity;



    @ApiModelProperty(value = "标准件/非标件")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "成本")
    @TableField("cost")
    private BigDecimal cost;

    @ApiModelProperty(value = "规格型号")
    @TableField("specification")
    private String specification;

    @ApiModelProperty(value = "领料方式:1:直接领料2:调拨领料3:直接倒冲4:调拨倒冲5:不发料")
    @TableField("delivery_method")
    private Integer deliveryMethod;

    @ApiModelProperty(value = "供应类型1:采购2:自制3:委外")
    @TableField("supply_type")
    private Integer supplyType;

    @ApiModelProperty(value = "损耗率(100)")
    @TableField("loss_rate")
    private Double lossRate;

    @ApiModelProperty(value = "预出仓库id")
    @TableField("warehouse_id")
    private Integer warehouseId;

    @ApiModelProperty(value = "预出仓库名称")
    @TableField("warehouse_name")
    private String warehouseName;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人名称")
    @TableField("create_user_name")
    private String createUserName;


}
